package org.jeecg.modules.demo.mall.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description: yx_shop_product
 * @Author: jeecg-boot
 * @Date:   2023-10-23
 * @Version: V1.0
 */
@Data
@TableName("yx_shop_product")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="yx_shop_product对象", description="yx_shop_product")
public class YxShopProduct implements Serializable {
    private static final long serialVersionUID = 1L;

	/**商品id*/
	@TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "商品id")
    private Long id;
	/**商户id*/
	@Excel(name = "商户id", width = 15)
    @ApiModelProperty(value = "商户id")
    private Integer merId;
	/**商品图片*/
	@Excel(name = "商品图片", width = 15)
    @ApiModelProperty(value = "商品图片")
    private String image;
	/**轮播图*/
	@Excel(name = "轮播图", width = 15)
    @ApiModelProperty(value = "轮播图")
    private String sliderImage;
	/**商品名称*/
	@Excel(name = "商品名称", width = 15)
    @ApiModelProperty(value = "商品名称")
    private String storeName;
	/**商品简介*/
	@Excel(name = "商品简介", width = 15)
    @ApiModelProperty(value = "商品简介")
    private String storeInfo;


	/**商品价格*/
	@Excel(name = "商品价格", width = 15)
    @ApiModelProperty(value = "商品价格")
    private BigDecimal price;
	/**会员价格*/
	@Excel(name = "会员价格", width = 15)
    @ApiModelProperty(value = "会员价格")
    private BigDecimal vipPrice;
	/**市场价*/
	@Excel(name = "市场价", width = 15)
    @ApiModelProperty(value = "市场价")
    private BigDecimal otPrice;

	/**单位名*/
	@Excel(name = "单位名", width = 15)
    @ApiModelProperty(value = "单位名")
    private String unitName;
	/**排序*/
	@Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    private Integer sort;
	/**销量*/
	@Excel(name = "销量", width = 15)
    @ApiModelProperty(value = "销量")
    private Integer sales;
	/**库存*/
	@Excel(name = "库存", width = 15)
    @ApiModelProperty(value = "库存")
    private Integer stock;
	/**状态（0：未上架，1：上架）*/
	@Excel(name = "状态（0：未上架，1：上架）", width = 15)
    @ApiModelProperty(value = "状态（0：未上架，1：上架）")
    @Dict(dicCode = "Mer_Prodct_isShow")
    private Integer isShow;

	/**产品描述*/
	@Excel(name = "产品描述", width = 15)
    @ApiModelProperty(value = "产品描述")
    private String description;
	/**添加时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "添加时间")
    private Date createTime;
	/**updateTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;
	/**是否删除*/
	@Excel(name = "是否删除", width = 15)
    @ApiModelProperty(value = "是否删除")
    @TableLogic
    private Integer isDel;
	/**是开启积分兑换*/
	@Excel(name = "是开启积分兑换", width = 15)
    @ApiModelProperty(value = "是开启积分兑换")
    private Integer isIntegral;
	/**需要多少积分兑换 只在开启积分兑换时生效*/
	@Excel(name = "需要多少积分兑换 只在开启积分兑换时生效", width = 15)
    @ApiModelProperty(value = "需要多少积分兑换 只在开启积分兑换时生效")
    private Integer integral;
	/**获得积分*/
	@Excel(name = "获得积分", width = 15)
    @ApiModelProperty(value = "获得积分")
    private BigDecimal giveIntegral;
	/**成本价*/
	@Excel(name = "成本价", width = 15)
    @ApiModelProperty(value = "成本价")
    private BigDecimal cost;
	/**是否单独分佣*/
	@Excel(name = "是否单独分佣", width = 15)
    @ApiModelProperty(value = "是否单独分佣")
    private Integer isSub;
	/**规格 0单 1多*/
	@Excel(name = "规格 0单 1多", width = 15)
    @ApiModelProperty(value = "规格 0单 1多")
    @Dict(dicCode = "Mer_Prodct_specType")
    private Integer specType;
	/**审核状态（1-审核中 2-已审核 3-审核失败）*/
	@Excel(name = "审核状态（1-审核中 2-已审核 3-审核失败）", width = 15)
    @ApiModelProperty(value = "审核状态（1-审核中 2-已审核 3-审核失败）")
    @Dict(dicCode = "Mer_Prodct_examineStatus")
    private Integer examineStatus;
	/**原因*/
	@Excel(name = "原因", width = 15)
    @ApiModelProperty(value = "原因")
    private String reason;
	/**分类id*/
	@Excel(name = "分类id", width = 15)
    @ApiModelProperty(value = "分类id")
    private String cateId;

    /**json*/
    @Excel(name = "json", width = 15)
    @ApiModelProperty(value = "json")
    private String skuLists;


    /**json*/
    @Excel(name = "json", width = 15)
    @ApiModelProperty(value = "json")
    private String attributeList;

    /**分类名称*/
    @TableField(exist = false)
    private String cateName;

    /**门店名称*/
    @TableField(exist = false)
    private String merName;

    /**
     * 会员等级
     */
    @TableField(exist = false)
    private Integer levelId;

    /**
     * 会员价格
     */
    @TableField(exist = false)
    private BigDecimal levelPrice;

    /**规格数组*/
    @TableField(exist = false)
    private List<YxShopSku> skus;


    @TableField(exist = false)
    private Integer skuId;
}
